package com.lzy.util;

public class Constants {

	public enum TaskType {
		created(1), waiting(2), success(3), failure(4);

		final int _value;
		
		TaskType(int value) {
			this._value = value;
		}

		public int value() {
			return _value;
		}
		
	    public static TaskType valueOf(int value) {
	        for(TaskType day : TaskType.values()) {
	            if(day.value() == value) {
	                return day;
	            }
	        }
	        return null; 
	    }
	}
	
	public enum Status {
		success(true), failure(false);

		final boolean _value;
		
		Status(boolean value) {
			this._value = value;
		}

		public boolean value() {
			return _value;
		}
	}

}
